package com.kunya.product.service;

import com.kunya.common.common.ServerResponse;
import com.kunya.product.po.Address;

import java.util.List;

/**
 * @author zhangjiaqing
 * @Description:个人中心收货地址的接口
 * @date 2018/7/17 19:03
 */
public interface IAddressService {
    /**
     * @Author WangGang
     * @Description 新增收货地址
     * @Date 8:55 2018/7/18
     **/
    ServerResponse insertAddress(Long userId, Address address, String tablePrefix);
    /**
     * @Author WangGang
     * @Description 根据用户id查询收货地址列表
     * @Date 10:11 2018/7/18
     **/
    ServerResponse<List<Address>> selectAddressListByUserId(Long userId,String tablePrefix);
    /**
     * @Author WangGang
     * @Description 根据收货地址id和用户id查询收货地址详情
     * @Date 10:48 2018/7/18
     **/
    ServerResponse selectAddress(Long addressId,Long userId,String tablePrefix);
    /**
     * @Author WangGang
     * @Description 根据收货地址id编辑收货地址
     * @Date 13:39 2018/7/18
     **/
    ServerResponse updateAddress(Long addressId,Address address,String tablePrefix);

    /**
     * @author zhangjiaqing
     * @Description: 收货地址的删除

     * @date 2018/7/18 9:11
     */
    ServerResponse removeAddress(Long addressId, String tablePrefix);
    /**
     * @author zhangjiaqing
     * @Description:默认收货地址
     * @date 2018/7/18 9:27
     */
    ServerResponse<Address> setDefaultAddress(Long userId, Long addressId, Boolean defaults, String tablePrefix);
}
